<!--学生评价表-->
<div class="OutDiv">
  <!--主页面-->
  <div class="mainPage" [hidden]="mainStatus !== 1">
    <div class="exciseTableDiv">
      <div class="aRow tableTop" style="float:right;">
        <label>
          <span>学年：</span>
          <nz-select style="width: 130px; margin-right: 20px" nzAllowClear nzPlaceHolder="请选择" [(ngModel)]="searchObj.schoolYear" (ngModelChange)="yearSearchChange($event)">
            <nz-option *ngFor="let item of yearListSearch" [nzLabel]="item.schoolYear" [nzValue]="item.schoolYear"></nz-option>
          </nz-select>
        </label>
        <label>
          <span>学期：</span>
          <nz-select style="width: 130px; margin-right: 20px" nzAllowClear nzPlaceHolder="请选择" [(ngModel)]="searchObj.semesterId">
            <nz-option *ngFor="let item of semestSearch" [nzLabel]="item.semesterName" [nzValue]="item.id"></nz-option>
          </nz-select>
        </label>
        <label>
          <span>课程编号：</span>
          <input nz-input [(ngModel)]="searchObj.number" placeholder="请输入"/>
        </label>
        <label>
          <span>课程名称：</span>
          <input nz-input [(ngModel)]="searchObj.name" placeholder="请输入"/>
        </label>
        <label>
          <span>任课教师：</span>
          <input nz-input [(ngModel)]="searchObj.teacherName" placeholder="请输入"/>
        </label>
        <label>
          <!--<span>授课班级：</span>-->
          <!--<input nz-input [(ngModel)]="searchObj.classesName" placeholder="请输入"/>-->
          <button nz-button style="margin-right:10px;" nzType="primary" (click)="clickSearch()">查询
          </button>
          <button style="margin-right: 0" nz-button nzType="default" (click)="resetSearch()">重置</button>
        </label>
      </div>
      <div class="w100 fl-l">
        <ng-template #totalTemplate let-total>总共 {{ pageInfo.totalRecords ? pageInfo.totalRecords : 0 }}条
        </ng-template>
        <nz-table
          #exciseBankTable
          nzBordered
          [nzData]="allList"
          [nzFrontPagination]="false"
          [nzShowPagination]="true"
          [nzPageIndex]="pageInfo.first"
          [nzTotal]="pageInfo.totalRecords"
          [nzShowTotal]="totalTemplate"
          [nzPageSize]="pageInfo.rows"
          [nzLoadingDelay]="1"
          [nzPageSizeOptions]="[10,20,30,50,100]"
          [nzShowQuickJumper]="true"
          [nzShowSizeChanger]="true"
          (nzPageIndexChange)="searchPageIndex($event)"
          (nzPageSizeChange)="searchPageSize($event)"
          (nzCurrentPageDataChange)="currentPageDataChange($event)"
          [nzWidthConfig]="nzWidthConfigs"
          [nzScroll]="{x: '2210px'}"
        >
          <thead>
          <tr>
            <th>序号</th>
            <th>学年</th>
            <th>学期</th>
            <th>课程编号</th>
            <th>课程名称</th>
            <th>课时</th>
            <th>课程类型</th>
            <th>开课部门</th>
            <th>任课教师</th>
            <th>工号</th>
            <th>职称</th>
            <!--<th>授课系部</th>-->
            <!--<th>授课专业</th>-->
            <!--<th>授课班级</th>-->
            <th>上课地点</th>
            <th>评价时间</th>
            <th style="width:120px;" nzRight="0px">操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let data of exciseBankTable.data; let i = index">
            <td>{{ i + 1}}</td>
            <td>{{ data.schoolYear}}</td>
            <td>{{ data.semesterName}}</td>
            <td>{{ data.number}}</td>
            <td>{{ data.name}}</td>
            <td>{{ data.sectionCount}}</td>
            <td>{{ data.type}}</td>
            <td>{{ data.startDeptName}}</td>
            <td>{{ data.teacherName}}</td>
            <td>{{ data.teacherNumber}}</td>
            <td>{{ data.teacherTitle}}</td>
            <!--<td>{{ data.startDeptName}}</td>-->
            <!--<td>{{ data.majorName}}</td>-->
            <!--<td>{{ data.classesName}}</td>-->
            <td>{{ data.address}}</td>
            <td>{{ data.noLimitDate === 1?'不限时':data.superviseDateStr}}</td>
            <td nzRight="0px">
              <span class="operaFont firOpera" (click)="edit(data.id)">详情</span>
              <span class="operaFont operaTao"
              nz-popconfirm
              nzOkType="danger"
              nzTitle="确定删除该记录吗?"
              (nzOnConfirm)="deleteOne(data.id)"
              nzPlacement="top"
              >删除</span>
            </td>
          </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
  <!--详情列表页面-->
  <div class="addPage" *ngIf="mainStatus === 2">
    <div style="height: 50px;justify-content:space-between" class="flex w100">
      <nz-tabset nzType="card">
        <nz-tab *ngFor="let tab of tabs;let i = index" [nzTitle]="tab" (nzClick)="changeTab(i)">{{ tab }}</nz-tab>
      </nz-tabset>
      <span class="fl-r operaFont" (click)="back(1)">
        返回上一级<i class="fa fa-reply m-l-sm"></i>
      </span>
    </div>
    <div class="exciseTableDiv">
      <div class="aRow tableTop">
        <nz-dropdown [nzTrigger]="'hover'" class="m-r-sm">
          <button nz-dropdown nz-button nzType="primary"><i nz-icon nzType="upload" nzTheme="outline"></i>
            导出
          </button>
          <ul nz-menu>
            <li nz-menu-item (click)="exportShow(1)">导出选中</li>
            <li nz-menu-item (click)="exportShow(3)">导出全部</li>
          </ul>
        </nz-dropdown>
        <div style="float: right;">
          <label>
            <span>学号：</span>
            <input nz-input [(ngModel)]="searchStuObj.studentNumber" placeholder="请输入"/>
          </label>
          <label>
            <span>学生姓名：</span>
            <input nz-input [(ngModel)]="searchStuObj.studentName" placeholder="请输入"/>
            <button nz-button style="margin-right:10px;" nzType="primary" (click)="clickSearchStu()">查询
            </button>
            <button style="margin-right: 0" nz-button nzType="default" (click)="resetSearchStu()">重置</button>
          </label>
        </div>

      </div>
      <div class="w100 fl-l">
        <ng-template #totalTemplate let-total>总共 {{ pageInfoStu.totalRecords ? pageInfoStu.totalRecords : 0 }}条
        </ng-template>
        <nz-table
          #exciseBankTable
          nzBordered
          [nzData]="evaluteList"
          [nzFrontPagination]="false"
          [nzShowPagination]="true"
          [nzPageIndex]="pageInfoStu.first"
          [nzTotal]="pageInfoStu.totalRecords"
          [nzShowTotal]="totalTemplate"
          [nzPageSize]="pageInfoStu.rows"
          [nzLoadingDelay]="1"
          [nzPageSizeOptions]="[10,20,30,50,100]"
          [nzShowQuickJumper]="true"
          [nzShowSizeChanger]="true"
          (nzPageIndexChange)="searchPageIndexStu($event)"
          (nzPageSizeChange)="searchPageSizeStu($event)"
          (nzCurrentPageDataChange)="currentPageDataChangeStu($event)"
        >
          <thead>
          <tr>
            <th class="tableCheck"
                nzShowCheckbox
                [(nzChecked)]="isAllCheck"
                [nzIndeterminate]="isIndeterminate"
                (nzCheckedChange)="checkAll($event)"
            ></th>
            <th>序号</th>
            <th>班级</th>
            <th>学号</th>
            <th>学生姓名</th>
            <th>提交评价时间</th>
            <th>评分</th>
            <th style="width:120px;">操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let data of exciseBankTable.data;let i = index">
            <td
              nzShowCheckbox
              [(nzChecked)]="mapOfCheckedId[data.studentId]"
              (nzCheckedChange)="refreshStatus()"
            ></td>
            <td>{{ i + 1}}</td>
            <td>{{ data.classesName}}</td>
            <td>{{ data.studentNumber}}</td>
            <td>{{ data.studentName}}</td>
            <td>{{ data.gmtModified? (data.gmtModified | date: 'yyyy-MM-dd HH:mm:ss'):'-' }}</td>
            <td>{{ data.score?data.score:'-'}}</td>
            <td>
              <span class="operaFont firOpera" (click)="detail(data.id)">{{data.id?'评价详情':'-'}}</span>
            </td>
          </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>

  <!-- 学生评价详情 -->
  <div class="addPage" *ngIf="mainStatus === 3">
    <div style="height: 50px;justify-content:space-between" class="flex w100">
      <div class="scoreName">评分：<span class="score">{{studentScore}}</span>分</div>
      <span class="fl-r operaFont" (click)="back(2)">
        返回上一级<i class="fa fa-reply m-l-sm"></i>
      </span>
    </div>
    <div class="exciseTableDiv" style="margin-top:30px">
      <div class="w100 fl-l">
        <nz-table
          #exciseBankTable
          nzBordered
          [nzData]="detailList"
          [nzFrontPagination]="false"
          [nzShowPagination]="false"
        >
          <thead>
          <tr>
            <th>序号</th>
            <th style="width:350px;">问题</th>
            <th>分数</th>
            <th>选项</th>
            <th>理由</th>
            <th>得分</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let data of exciseBankTable.data;let i = index">
            <td>{{ i+ 1 }}</td>
            <td [innerHTML]="data.examQuestionContent | html"></td>
            <td>{{ data.examQuestionScore}}</td>
            <td>{{ data.examSelectName}}</td>
            <td>{{ data.content}}</td>
            <td>{{ data.getScore}}</td>
          </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>
